const mongoose = require('mongoose');

// 定义用户数据的 Schema（结构 + 校验）
const sessionSchema = new mongoose.Schema({
  authorId:{ type:mongoose.Schema.Types.ObjectId,ref: 'User', required: true },
  serviceId:{ type:mongoose.Schema.Types.ObjectId,ref: 'Admin', required: true },
  status:{type:String,enum: [
      'active',
      'closed'
    ],},
  createTime:{type:Date}
});



module.exports = mongoose.model('Session', sessionSchema);